package my.yuan.dubbo.controller;

import my.yuan.dubbo.consumer.DemoConsumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zhaoqiyuan
 * @description: TODO
 * @date: 2021/12/13 15:11
 */
@RestController
@RequestMapping("/demo")
public class DemoController {
    @Autowired
    private DemoConsumer demoConsumer;

    @GetMapping("/test")
    public String test(@RequestParam(value = "a", required = false) String a) {
        return demoConsumer.test(a);
    }
}
